{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# ndarray\n",
    "\n",
    "参考: https://www.cnblogs.com/mxnote/articles/17459015.html"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 引入依赖"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    ":dep ndarray = {version = \"0.15.6\"}\n",
    "\n",
    "use ndarray::prelude::*;"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 一维数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "arr1: [1, 2, 3, 4, 5, 6]\n",
      "arr3: [2, 4.2, 6.3, 8, 10, 12]\n"
     ]
    }
   ],
   "source": [
    "let arr1 = array![1., 2., 3., 4., 5., 6.];\n",
    "println!(\"arr1: {}\", arr1);\n",
    "\n",
    "let arr2 = array![1., 2.2, 3.3, 4., 5., 6.];\n",
    "let arr3 = arr1 + arr2;\n",
    "println!(\"arr3: {}\", arr3);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 二维数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "arr6:\n",
      "[[2, 3, 4],\n",
      " [5, 6, 7]]\n",
      "arr8: \n",
      "[[0, 0, 0],\n",
      " [0, 0, 0]]\n"
     ]
    }
   ],
   "source": [
    "let arr4 = array![\n",
    "    [1., 2., 3.], \n",
    "    [ 4., 5., 6.]\n",
    "];\n",
    "let arr5 = Array::from_elem((2, 1), 1.);\n",
    "let arr6 = arr4 + arr5;\n",
    "println!(\"arr6:\\n{}\", arr6);\n",
    "\n",
    "let arr7 =  Array::<f64, _>::zeros(arr6.raw_dim());\n",
    "let arr8 = arr6 * arr7;\n",
    "println!(\"arr8: \\n{}\", arr8);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "i: \n",
      "[[1, 0, 0],\n",
      " [0, 1, 0],\n",
      " [0, 0, 1]]\n",
      "arr9:\n",
      "[[1, 2, 3],\n",
      " [4, 5, 6],\n",
      " [7, 8, 9]]\n",
      "arr9 * i = \n",
      "[[1, 0, 0],\n",
      " [0, 5, 0],\n",
      " [0, 0, 9]]\n",
      "arr11: [[1, 0, 0],\n",
      " [0, 5, 0],\n",
      " [0, 0, 9]]\n"
     ]
    }
   ],
   "source": [
    "let identity: Array2<f64> = Array::eye(3);\n",
    "println!(\"i: \\n{}\", &identity);\n",
    "\n",
    "let arr9 = array![\n",
    "    [1., 2., 3.],\n",
    "    [4., 5., 6.],\n",
    "    [7., 8., 9.]\n",
    "];\n",
    "println!(\"arr9:\\n{}\", &arr9);\n",
    "let arr10 = &arr9 * &identity;\n",
    "println!(\"arr9 * i = \\n{}\", arr10);\n",
    "\n",
    "let arr11 = arr10.dot(&identity);\n",
    "println!(\"arr11: {}\", &arr11);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 随机矩阵"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    ":dep ndarray-rand={version = \"0.14.0\"}\n",
    "\n",
    "use ndarray_rand::{RandomExt, SamplingStrategy};\n",
    "use ndarray_rand::rand_distr::Uniform;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[ 1.63,  1.75,  7.67,  0.69,  4.47],\n"
     ]
    }
   ],
   "source": [
    "let arr13 = Array::random((2, 5), Uniform::new(0., 10.));\n",
    "println!(\"{:5.2}\", arr13);\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Sampling from:\t[1, 2, 3, 4, 5, 6]\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Two elements:\t[2, 5]\n"
     ]
    }
   ],
   "source": [
    "let arr14 = array![1., 2., 3., 4., 5., 6.];\n",
    "let arr15 = arr14.sample_axis(Axis(0), 2, SamplingStrategy::WithoutReplacement);\n",
    "println!(\"Sampling from:\\t{}\\nTwo elements:\\t{}\", arr14, arr15);\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "use ndarray_rand::rand as rand;\n",
    "use rand::seq::IteratorRandom;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Sampling from:\t😀😎😐😕😠😢\n",
      "Elements:\n",
      "[[😢, 😎],\n",
      " [😐, 😕]]\n"
     ]
    }
   ],
   "source": [
    "let mut rng = rand::thread_rng();\n",
    "let faces = \"😀😎😐😕😠😢\";\n",
    "let arr16 = Array::from_shape_vec((2, 2), faces.chars().choose_multiple(&mut rng, 4)).unwrap();\n",
    "println!(\"Sampling from:\\t{}\", faces);\n",
    "println!(\"Elements:\\n{}\", arr16);\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 用ndarray-stats实现统计"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [],
   "source": [
    "use ndarray_rand::rand_distr::{Uniform, StandardNormal}; "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    ":dep ndarray-stats = {version=\"0.5.1\"}\n",
    ":dep noisy_float = {version=\"0.2.0\"}\n",
    "\n",
    "use ndarray_stats::HistogramExt;\n",
    "use ndarray_stats::histogram::{strategies::Sqrt, GridBuilder};\n",
    "use noisy_float::types::{N64, n64};"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[3, 1, 0, 2, 1, 1, 3, 2, 3, 5, 5, 2, 5, 10, 12, 14, 15, 18, 22, 31, 46, 44, 42, 52, 54, 79, 79, 97, 110, 124, 119, 143, 154, 213, 201, 203, 220, 238, 232, 255, 290, 278, 271, 279, 300, 329, 307, 284, 285, 290, 308, 280, 289, 272, 257, 251, 244, 260, 224, 204, 197, 184, 169, 139, 121, 118, 115, 90, 65, 56, 62, 43, 47, 40, 31, 30, 21, 17, 22, 15, 11, 9, 9, 8, 1, 6, 1, 4, 1, 0, 2, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0]\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "()"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "let arr17 = Array::<f64, _>::random_using((10000,2), StandardNormal, &mut rand::thread_rng());\n",
    "let data = arr17.mapv(|e| n64(e));\n",
    "let grid = GridBuilder::<Sqrt<N64>>::from_array(&data).unwrap().build();\n",
    "let histogram = data.histogram(grid);\n",
    "{\n",
    "let histogram_matrix = histogram.counts();\n",
    "let data = histogram_matrix.sum_axis(Axis(0));\n",
    "println!(\"{}\", data);\n",
    "\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [],
   "source": [
    ":dep plotters = {version=\"0.3.4\", default_features = false, features = [\"evcxr\", \"all_series\", \"all_elements\"]}\n",
    "\n",
    "extern crate plotters;\n",
    "use plotters::prelude::*;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"\"><svg width=\"640\" height=\"480\" viewBox=\"0 0 640 480\" xmlns=\"http://www.w3.org/2000/svg\">\n",
       "<rect x=\"0\" y=\"0\" width=\"640\" height=\"480\" opacity=\"1\" fill=\"#FFFFFF\" stroke=\"none\"/>\n",
       "<text x=\"320\" y=\"5\" dy=\"0.76em\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"24.193548387096776\" opacity=\"1\" fill=\"#000000\">\n",
       "随机数分布图\n",
       "</text>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"439\" x2=\"639\" y2=\"439\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"433\" x2=\"639\" y2=\"433\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"426\" x2=\"639\" y2=\"426\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"419\" x2=\"639\" y2=\"419\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"413\" x2=\"639\" y2=\"413\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"406\" x2=\"639\" y2=\"406\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"399\" x2=\"639\" y2=\"399\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"392\" x2=\"639\" y2=\"392\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"386\" x2=\"639\" y2=\"386\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"379\" x2=\"639\" y2=\"379\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"372\" x2=\"639\" y2=\"372\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"365\" x2=\"639\" y2=\"365\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"359\" x2=\"639\" y2=\"359\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"352\" x2=\"639\" y2=\"352\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"345\" x2=\"639\" y2=\"345\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"338\" x2=\"639\" y2=\"338\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"332\" x2=\"639\" y2=\"332\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"325\" x2=\"639\" y2=\"325\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"318\" x2=\"639\" y2=\"318\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"312\" x2=\"639\" y2=\"312\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"305\" x2=\"639\" y2=\"305\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"298\" x2=\"639\" y2=\"298\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"291\" x2=\"639\" y2=\"291\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"285\" x2=\"639\" y2=\"285\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"278\" x2=\"639\" y2=\"278\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"271\" x2=\"639\" y2=\"271\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"264\" x2=\"639\" y2=\"264\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"258\" x2=\"639\" y2=\"258\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"251\" x2=\"639\" y2=\"251\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"244\" x2=\"639\" y2=\"244\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"237\" x2=\"639\" y2=\"237\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"231\" x2=\"639\" y2=\"231\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"224\" x2=\"639\" y2=\"224\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"217\" x2=\"639\" y2=\"217\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"211\" x2=\"639\" y2=\"211\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"204\" x2=\"639\" y2=\"204\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"197\" x2=\"639\" y2=\"197\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"190\" x2=\"639\" y2=\"190\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"184\" x2=\"639\" y2=\"184\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"177\" x2=\"639\" y2=\"177\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"170\" x2=\"639\" y2=\"170\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"163\" x2=\"639\" y2=\"163\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"157\" x2=\"639\" y2=\"157\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"150\" x2=\"639\" y2=\"150\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"143\" x2=\"639\" y2=\"143\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"136\" x2=\"639\" y2=\"136\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"130\" x2=\"639\" y2=\"130\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"123\" x2=\"639\" y2=\"123\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"116\" x2=\"639\" y2=\"116\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"110\" x2=\"639\" y2=\"110\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"103\" x2=\"639\" y2=\"103\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"96\" x2=\"639\" y2=\"96\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"89\" x2=\"639\" y2=\"89\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"83\" x2=\"639\" y2=\"83\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"76\" x2=\"639\" y2=\"76\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"69\" x2=\"639\" y2=\"69\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"62\" x2=\"639\" y2=\"62\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"56\" x2=\"639\" y2=\"56\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"49\" x2=\"639\" y2=\"49\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"42\" x2=\"639\" y2=\"42\"/>\n",
       "<line opacity=\"0.1\" stroke=\"#000000\" stroke-width=\"1\" x1=\"40\" y1=\"35\" x2=\"639\" y2=\"35\"/>\n",
       "<line opacity=\"0.3\" stroke=\"#FFFFFF\" stroke-width=\"1\" x1=\"40\" y1=\"439\" x2=\"639\" y2=\"439\"/>\n",
       "<line opacity=\"0.3\" stroke=\"#FFFFFF\" stroke-width=\"1\" x1=\"40\" y1=\"372\" x2=\"639\" y2=\"372\"/>\n",
       "<line opacity=\"0.3\" stroke=\"#FFFFFF\" stroke-width=\"1\" x1=\"40\" y1=\"305\" x2=\"639\" y2=\"305\"/>\n",
       "<line opacity=\"0.3\" stroke=\"#FFFFFF\" stroke-width=\"1\" x1=\"40\" y1=\"237\" x2=\"639\" y2=\"237\"/>\n",
       "<line opacity=\"0.3\" stroke=\"#FFFFFF\" stroke-width=\"1\" x1=\"40\" y1=\"170\" x2=\"639\" y2=\"170\"/>\n",
       "<line opacity=\"0.3\" stroke=\"#FFFFFF\" stroke-width=\"1\" x1=\"40\" y1=\"103\" x2=\"639\" y2=\"103\"/>\n",
       "<line opacity=\"0.3\" stroke=\"#FFFFFF\" stroke-width=\"1\" x1=\"40\" y1=\"35\" x2=\"639\" y2=\"35\"/>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"39,35 39,439 \"/>\n",
       "<text x=\"30\" y=\"439\" dy=\"0.5ex\" text-anchor=\"end\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "0\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"34,439 39,439 \"/>\n",
       "<text x=\"30\" y=\"372\" dy=\"0.5ex\" text-anchor=\"end\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "50\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"34,372 39,372 \"/>\n",
       "<text x=\"30\" y=\"305\" dy=\"0.5ex\" text-anchor=\"end\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "100\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"34,305 39,305 \"/>\n",
       "<text x=\"30\" y=\"237\" dy=\"0.5ex\" text-anchor=\"end\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "150\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"34,237 39,237 \"/>\n",
       "<text x=\"30\" y=\"170\" dy=\"0.5ex\" text-anchor=\"end\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "200\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"34,170 39,170 \"/>\n",
       "<text x=\"30\" y=\"103\" dy=\"0.5ex\" text-anchor=\"end\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "250\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"34,103 39,103 \"/>\n",
       "<text x=\"30\" y=\"35\" dy=\"0.5ex\" text-anchor=\"end\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "300\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"34,35 39,35 \"/>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"40,440 639,440 \"/>\n",
       "<text x=\"42\" y=\"450\" dy=\"0.76em\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "0\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"42,440 42,445 \"/>\n",
       "<text x=\"101\" y=\"450\" dy=\"0.76em\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "10\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"101,440 101,445 \"/>\n",
       "<text x=\"160\" y=\"450\" dy=\"0.76em\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "20\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"160,440 160,445 \"/>\n",
       "<text x=\"219\" y=\"450\" dy=\"0.76em\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "30\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"219,440 219,445 \"/>\n",
       "<text x=\"277\" y=\"450\" dy=\"0.76em\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "40\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"277,440 277,445 \"/>\n",
       "<text x=\"336\" y=\"450\" dy=\"0.76em\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "50\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"336,440 336,445 \"/>\n",
       "<text x=\"395\" y=\"450\" dy=\"0.76em\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "60\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"395,440 395,445 \"/>\n",
       "<text x=\"453\" y=\"450\" dy=\"0.76em\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "70\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"453,440 453,445 \"/>\n",
       "<text x=\"512\" y=\"450\" dy=\"0.76em\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "80\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"512,440 512,445 \"/>\n",
       "<text x=\"571\" y=\"450\" dy=\"0.76em\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "90\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"571,440 571,445 \"/>\n",
       "<text x=\"630\" y=\"450\" dy=\"0.76em\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"9.67741935483871\" opacity=\"1\" fill=\"#000000\">\n",
       "100\n",
       "</text>\n",
       "<polyline fill=\"none\" opacity=\"1\" stroke=\"#000000\" stroke-width=\"1\" points=\"630,440 630,445 \"/>\n",
       "<rect x=\"41\" y=\"435\" width=\"3\" height=\"4\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"46\" y=\"438\" width=\"4\" height=\"1\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"52\" y=\"439\" width=\"4\" height=\"0\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"58\" y=\"437\" width=\"4\" height=\"2\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"64\" y=\"438\" width=\"4\" height=\"1\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"70\" y=\"438\" width=\"4\" height=\"1\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"76\" y=\"435\" width=\"4\" height=\"4\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"82\" y=\"437\" width=\"3\" height=\"2\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"87\" y=\"435\" width=\"4\" height=\"4\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"93\" y=\"433\" width=\"4\" height=\"6\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"99\" y=\"433\" width=\"4\" height=\"6\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"105\" y=\"437\" width=\"4\" height=\"2\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"111\" y=\"433\" width=\"4\" height=\"6\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"117\" y=\"426\" width=\"4\" height=\"13\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"123\" y=\"423\" width=\"4\" height=\"16\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"129\" y=\"421\" width=\"3\" height=\"18\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"134\" y=\"419\" width=\"4\" height=\"20\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"140\" y=\"415\" width=\"4\" height=\"24\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"146\" y=\"410\" width=\"4\" height=\"29\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"152\" y=\"398\" width=\"4\" height=\"41\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"158\" y=\"378\" width=\"4\" height=\"61\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"164\" y=\"380\" width=\"4\" height=\"59\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"170\" y=\"383\" width=\"4\" height=\"56\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"176\" y=\"369\" width=\"3\" height=\"70\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"181\" y=\"367\" width=\"4\" height=\"72\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"187\" y=\"333\" width=\"4\" height=\"106\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"193\" y=\"333\" width=\"4\" height=\"106\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"199\" y=\"309\" width=\"4\" height=\"130\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"205\" y=\"291\" width=\"4\" height=\"148\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"211\" y=\"273\" width=\"4\" height=\"166\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"217\" y=\"279\" width=\"4\" height=\"160\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"223\" y=\"247\" width=\"3\" height=\"192\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"228\" y=\"232\" width=\"4\" height=\"207\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"234\" y=\"153\" width=\"4\" height=\"286\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"240\" y=\"169\" width=\"4\" height=\"270\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"246\" y=\"166\" width=\"4\" height=\"273\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"252\" y=\"143\" width=\"4\" height=\"296\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"258\" y=\"119\" width=\"4\" height=\"320\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"264\" y=\"127\" width=\"3\" height=\"312\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"269\" y=\"96\" width=\"4\" height=\"343\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"275\" y=\"49\" width=\"4\" height=\"390\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"281\" y=\"65\" width=\"4\" height=\"374\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"287\" y=\"75\" width=\"4\" height=\"364\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"293\" y=\"64\" width=\"4\" height=\"375\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"299\" y=\"35\" width=\"4\" height=\"404\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"305\" y=\"35\" width=\"4\" height=\"404\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"311\" y=\"35\" width=\"3\" height=\"404\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"316\" y=\"57\" width=\"4\" height=\"382\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"322\" y=\"56\" width=\"4\" height=\"383\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"328\" y=\"49\" width=\"4\" height=\"390\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"334\" y=\"35\" width=\"4\" height=\"404\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"340\" y=\"62\" width=\"4\" height=\"377\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"346\" y=\"50\" width=\"4\" height=\"389\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"352\" y=\"73\" width=\"4\" height=\"366\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"358\" y=\"93\" width=\"3\" height=\"346\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"363\" y=\"101\" width=\"4\" height=\"338\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"369\" y=\"111\" width=\"4\" height=\"328\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"375\" y=\"89\" width=\"4\" height=\"350\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"381\" y=\"138\" width=\"4\" height=\"301\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"387\" y=\"165\" width=\"4\" height=\"274\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"393\" y=\"174\" width=\"4\" height=\"265\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"399\" y=\"192\" width=\"4\" height=\"247\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"405\" y=\"212\" width=\"3\" height=\"227\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"410\" y=\"252\" width=\"4\" height=\"187\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"416\" y=\"277\" width=\"4\" height=\"162\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"422\" y=\"281\" width=\"4\" height=\"158\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"428\" y=\"285\" width=\"4\" height=\"154\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"434\" y=\"318\" width=\"4\" height=\"121\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"440\" y=\"352\" width=\"4\" height=\"87\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"446\" y=\"364\" width=\"3\" height=\"75\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"451\" y=\"356\" width=\"4\" height=\"83\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"457\" y=\"382\" width=\"4\" height=\"57\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"463\" y=\"376\" width=\"4\" height=\"63\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"469\" y=\"386\" width=\"4\" height=\"53\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"475\" y=\"398\" width=\"4\" height=\"41\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"481\" y=\"399\" width=\"4\" height=\"40\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"487\" y=\"411\" width=\"4\" height=\"28\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"493\" y=\"417\" width=\"3\" height=\"22\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"498\" y=\"410\" width=\"4\" height=\"29\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"504\" y=\"419\" width=\"4\" height=\"20\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"510\" y=\"425\" width=\"4\" height=\"14\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"516\" y=\"427\" width=\"4\" height=\"12\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"522\" y=\"427\" width=\"4\" height=\"12\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"528\" y=\"429\" width=\"4\" height=\"10\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"534\" y=\"438\" width=\"4\" height=\"1\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"540\" y=\"431\" width=\"3\" height=\"8\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"545\" y=\"438\" width=\"4\" height=\"1\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"551\" y=\"434\" width=\"4\" height=\"5\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"557\" y=\"438\" width=\"4\" height=\"1\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"563\" y=\"439\" width=\"4\" height=\"0\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"569\" y=\"437\" width=\"4\" height=\"2\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"575\" y=\"439\" width=\"4\" height=\"0\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"581\" y=\"439\" width=\"4\" height=\"0\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"587\" y=\"439\" width=\"3\" height=\"0\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"592\" y=\"438\" width=\"4\" height=\"1\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"598\" y=\"438\" width=\"4\" height=\"1\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"604\" y=\"438\" width=\"4\" height=\"1\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"610\" y=\"439\" width=\"4\" height=\"0\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"616\" y=\"439\" width=\"4\" height=\"0\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"622\" y=\"438\" width=\"4\" height=\"1\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "<rect x=\"628\" y=\"439\" width=\"4\" height=\"0\" opacity=\"1\" fill=\"#FF0000\" stroke=\"none\"/>\n",
       "</svg>\n",
       "</div>"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "let figure = evcxr_figure((640, 480), |root| {\n",
    "    root.fill(&WHITE);\n",
    "    let histogram_matrix = histogram.counts();\n",
    "    let data = histogram_matrix.sum_axis(Axis(0));\n",
    "    let mut chart = ChartBuilder::on(&root)\n",
    "        .set_label_area_size(LabelAreaPosition::Left, 40)\n",
    "        .set_label_area_size(LabelAreaPosition::Bottom, 40)\n",
    "        .caption(\"随机数分布图\", (\"sans-serif\", 30))\n",
    "        .build_cartesian_2d((0..data.len()).into_segmented(), 0..300)\n",
    "        .unwrap();\n",
    "\n",
    "    chart\n",
    "        .configure_mesh()\n",
    "        .disable_x_mesh()\n",
    "        .bold_line_style(&WHITE.mix(0.3))\n",
    "        .axis_desc_style((\"sans-serif\", 15))\n",
    "        .draw()?;\n",
    "\n",
    "    chart.draw_series((0..).zip(data.iter()).map(|(x, y)| {\n",
    "        let x0 = SegmentValue::Exact(x);\n",
    "        let x1 = SegmentValue::Exact(x + 1);\n",
    "        let mut bar = Rectangle::new([(x0, 0), (x1, (*y) as i32)], RED.filled());\n",
    "        bar.set_margin(0, 0, 1, 1);\n",
    "        bar\n",
    "    }))?;\n",
    "\n",
    "    Ok(())\n",
    "});\n",
    "figure\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Rust",
   "language": "rust",
   "name": "rust"
  },
  "language_info": {
   "codemirror_mode": "rust",
   "file_extension": ".rs",
   "mimetype": "text/rust",
   "name": "rust",
   "pygment_lexer": "rust",
   "version": ""
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
